import request from '@/utils/request'

export function addCourse(data) {
  return request({
    url: 'api/product/add',
    method: 'post',
    data
  })
}

export function queryList(params) {
  return request({
    url: 'api/product/page',
    method: 'get',
    params
  })
}
export function delCourse(id) {
  return request({
    url: `api/product/${id}`,
    method: 'DELETE'
  })
}
export function course(id) {
  return request({
    url: `api/product/${id}`,
    method: 'get'
  })
}
export function updateCourse(data) {
  return request({
    url: `api/product/update`,
    method: 'put',
    data
  })
}